
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.PersonalRest;
import com.cmc.dao.PersonalRestDao;
import com.cmc.service.PersonalRestManager;

public class PersonalRestManagerImpl extends BaseManager implements PersonalRestManager {
    private PersonalRestDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setPersonalRestDao(PersonalRestDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.PersonalRestManager#getPersonalRests(com.cmc.model.PersonalRest)
     */
    public List getPersonalRests(final PersonalRest personalRest) {
        return dao.getPersonalRests(personalRest);
    }

    /**
     * @see com.cmc.service.PersonalRestManager#getPersonalRest(String id)
     */
    public PersonalRest getPersonalRest(final String id) {
        return dao.getPersonalRest(new Long(id));
    }

    /**
     * @see com.cmc.service.PersonalRestManager#savePersonalRest(PersonalRest personalRest)
     */
    public void savePersonalRest(PersonalRest personalRest) {
        dao.savePersonalRest(personalRest);
    }

    /**
     * @see com.cmc.service.PersonalRestManager#removePersonalRest(String id)
     */
    public void removePersonalRest(final String id) {
        dao.removePersonalRest(new Long(id));
    }
}
